package com.uls.questionnaire.vo;

import java.io.Serializable;
import java.util.Objects;

public class QuestionnaireViewVO implements Serializable
{
    private static final long serialVersionUID = 1L;


    private Long questionId;       // 问题ID
    private String title;          // 问卷标题
    private String questionText;   // 问题文本
    private String questionType;    // 问题类型
    private Long optionId;         // 选项ID
    private String optionText;     // 选项文本

    // Getters and Setters
    public Long getQuestionId() {
        return questionId;
    }

    public void setQuestionId(Long questionId) {
        this.questionId = questionId;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getQuestionText() {
        return questionText;
    }

    public void setQuestionText(String questionText) {
        this.questionText = questionText;
    }

    public String getQuestionType() {
        return questionType;
    }

    public void setQuestionType(String questionType) {
        this.questionType = questionType;
    }

    public Long getOptionId() {
        return optionId;
    }

    public void setOptionId(Long optionId) {
        this.optionId = optionId;
    }

    public String getOptionText() {
        return optionText;
    }

    public void setOptionText(String optionText) {
        this.optionText = optionText;
    }

    @Override
    public String toString() {
        return "QuestionnaireViewVO{" +
                "questionId=" + questionId +
                ", title='" + title + '\'' +
                ", questionText='" + questionText + '\'' +
                ", questionType='" + questionType + '\'' +
                ", optionId=" + optionId +
                ", optionText='" + optionText + '\'' +
                '}';
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (!(o instanceof QuestionnaireViewVO)) return false;
        QuestionnaireViewVO that = (QuestionnaireViewVO) o;
        return Objects.equals(questionId, that.questionId) &&
                Objects.equals(optionId, that.optionId);
    }

    @Override
    public int hashCode() {
        return Objects.hash(questionId, optionId);
    }
}
